package cn.edu.scau.cmi.yangminghao.FactoryPackage;

public class PolicyProducer {
	public static AutoInsurance getPolicyObj(String option)
	{
		AutoInsurance policy = null;
		if(option.equals("Body Injure")) {
			policy = new BodyInjure();
		}
		else if(option.equals("Com")) {
			policy = new Com();
		}
		else if(option.equals("Person Injure")) {
			policy = new PersonInjure();
		}
		else if (option.equals("Property")) {
			policy = new Property();
		}
		return policy;
	}
}
